package com.meng.test;

import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;


/**
 * ${DESCRIPTION}
 *
 * @author MENG
 * @version 2018/3/26
 * @see
 */
public class ClientWrite implements Runnable
{

    Socket socket;

    public ClientWrite(Socket socket)
    {
        this.socket=socket;
    }

    @Override
    public void run()
    {

//        while (true)
//        {
            try
            {
                Thread.sleep(5000);
            }
            catch (InterruptedException e)
            {
                e.printStackTrace();
            }

            // fasongshuju  字节

            String consumeRecord = "$nmlgd$188"

                                   +"12"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"



                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"01"+"12345678"+"12345678"+"01234567890123456789"

                                   +"0123456789123456"+"012345678912"+"01234567891234"+"012345678912"

                                   +"01234567891234"+"12345678"+"12345678"+"12"+"12"+"1234"+"1234"

                                   +"12345678"+"1234"+"12345678"+"1234"+"12"+"12"+"12"+"0123456789123456"

                                   +"1234"+"1234"+"12"+"0123456789123"+"0123456789123"+"12"+"12"+"12"

                                   +"12345678"+"012345678912"+"012345678912345678"+"12345678"


                                   +"end";

            byte[] bytes = consumeRecord.getBytes();

            try {


                //获得输出流
                DataOutputStream outputStream = new DataOutputStream(socket.getOutputStream());

                outputStream.write(bytes);

            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
//        }

    }
}
